It is located at $JBOSS_SNMP_ADAPTOR/META-INF/notifications.xml and controls the mapping of JMX notifications onto SNMP traps. The key for the mapping is considered to be the notification type as defined in the subscriptions list of the SNMP Adaptor JBoss Service configuration file.
For generic SNMPv1 traps, Enterprise field contains value of sysObjectID of the device that sends trap. For vendor specific traps, Generic trap type field is set to enterpriseSpecific(6
Each mapping entry must specify :
notification-type : The type of JMX Notifications to wrap as a SNMP Notification. Please note that the notification has to be caught first by the subscription list filter defined in SNMP Adaptor JBoss Service configuration file (A walk-through for that is given in Sending JMX Notifications as SNMP Traps (or INFORMs)
Note : The below attributes generic, specific and enterprise varies depending on the version of the protocol namely - v1 and v2. For v1, . For v2 and v3, It is essentially a concatenation of the enterprise parameter and two additional sub-identifiers, '0' (so make sure to set generic as 0 here), and the specific trap code parameter
generic : Indicates one of a number of generic trap types
specific : Indicates one of a number of specific trap codes.
enterprise : contains value of sysObjectID of the device that sends trap
inform : if set to "true", this trap will be send as an inform (acknowledged trap)
security-name : the user to associate with the sending of the trap (will be used for version 3 of the protocol only)
var-bind-list whose defines a wrapper-class that allows to to extract info from arbitrary notification subclasses. The generated trap may contain an arbitrary payload of variable bindings (var-bind) with explicitly specified oid and values extracted from the emitted notification (tag). To extract those values a wrapper class implementing the org.jboss.jmx.adaptor.snmp.agent.NotificationWrapper interface must be supplied. At runtime, the value specified using the element is passed to the wrapper class implementation as the key to be mapped, in an implementation specific way, to a corresponding value. A default implementation of this interface comes with class org.jboss.jmx.adaptor.snmp.agent.NotificationWrapperSupport. This implementation recognizes the following set of tags :
Tag |
Description |
n:message |
javax.management.Notification.getMessage() |
n:sequenceNumber |
javax.management.Notification.getSequenceNumber() |
n:timeStamp |
javax.management.Notification.getTimestamp() |
n:type |
javax.management.Notification.getType() |
n:all |
javax.management.Notification.toString() |
n:class |
javax.management.Notification.getClass().getName() |
a:startTime |
snmp agent/adaptor start time |
a:uptime |
snmp agent/adaptor up time |
a:trapCount |
snmp agent/adaptor trap count |
u:<user-defined-tag> |
looked-up in n.getUserData() |